Stop enable_padding_free_metadata writing seq_lengths into the caller's examples - #8049
vineethsaivs wants to merge 3 commits into
Conversation
|
You are right, and the reason is bigger than a nullable column, so thanks for pushing on it. Fixed in I had framed the write-back as caching, which was wrong. It was load-bearing. TRL's Two things break, not one. Your null case reaches The packed row's second document starts at position 2 instead of 0, so it attends across the document boundary. That is silent, and it is exactly what padding-free metadata exists to prevent. Your suggested shape is what I did: pass a normalized copy to the wrapped collator, built only when something was actually derived, so the common path still hands the caller's own list straight through with no per-row copies. Ran it three ways against |
30d8d4f to
ed30fc6
Compare
…'s examples Put the derived lengths on a shallow copy, so the wrapped collator still sees them without the caller's own rows being mutated.
0c1e631 to
841d32f
Compare
|
Review record for #8049, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#309. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
The padding-free collator wrapper adds
seq_lengthsto the caller's examples while deriving metadata. Pass copies containing the derived lengths to the wrapped collator, leaving the original examples untouched.Rebased onto current main. The two CPU source-harness regressions pass for missing, explicit and null lengths, and changed-file pre-commit passes. Full package tests cannot import on this host and remain for upstream CI. The old CI logs have expired, so this refresh requests a fresh run.